CREATE TABLE DAC_ISSUE
(
  ISSUE_ID    INTEGER  PRIMARY KEY AUTOINCREMENT,
  ISSUE_TITLE    NVARCHAR(255)       NOT NULL,
  ISSUE_DESC    NVARCHAR(2000)       NULL,
  ISSUE_STS    INTEGER       NOT NULL,
  ISSUE_TYP    NVARCHAR(50)       NULL,
  ISSUE_OWNR    NVARCHAR(50)       NULL,
  ISSUE_PRGS    NUMERIC(18, 2)       NULL,
  CREATE_TM    TIMESTAMP       NOT NULL,
  ISSUE_LOCKED    INTEGER       NULL
)
;

CREATE TABLE DAC_USER
(
  USER_ID    NVARCHAR(50)       PRIMARY KEY NOT NULL,
  USERNAME    NVARCHAR(50)       NOT NULL,
  FULLNAME    NVARCHAR(255)       NULL,
  USER_PWD    NVARCHAR(50)       NULL,
  CHANGINGPWD    INTEGER       NULL,
  USERLOCKED    INTEGER       NULL,
  LASTLOGIN    TIMESTAMP       NULL,
  USER_DESC    NVARCHAR(2000)       NULL
)
;

CREATE TABLE DAC_LINE
(
  POINT_ID    INTEGER    PRIMARY KEY AUTOINCREMENT,
  POINT    NVARCHAR(50)       NULL
)
;

CREATE TABLE DAC_MUTIPLEKEYS
(
  DAC_KEY1    NVARCHAR(50)       NOT NULL,
  DAC_KEY2    NVARCHAR(50)       NOT NULL,
  DAC_VALUE1    NVARCHAR(50)       NULL,
  DAC_VALUE2    NVARCHAR(50)       NULL,
  PRIMARY KEY (DAC_KEY1, DAC_KEY2)
)
;


CREATE TABLE LOG
(
  LOG_ID    INTEGER    PRIMARY KEY,
  USER_ID    NVARCHAR(50)       NULL,
  ACTION_TYPE NVARCHAR(50)		NULL,
  ACTIONN_TIME TIMESTAMP		NULL,
  ACTION_DESC	NVARCHAR(2000)		NULL
)
;